package com.situ.day4;

public class Rectangle {
    private int width;
    private int height;

    public Rectangle() {
        this(1, 1);
    }

    public Rectangle(int width, int height) {
        this.width = width;
        this.height = height;
    }

    public Rectangle(int width) {
        //this.width = width;
        //this.height = width;
        this(width, width);
    }

    public int getZhouChang() {
        return (width + height) * 2;
    }

    public int getMianJi() {
        return width * height;
    }
}
